package sf.md.create.factory.simple;

public class Client {

    public static void main(String[] args){
        AppleFactory appleFactory = new AppleHandler();
        try {
          BigApple bigApple =   (BigApple) appleFactory.createApple(AppleEnum.BigApple);
          if(bigApple instanceof  BigApple){
              System.out.println("工厂生产了一个新的苹果");

          }
        } catch (Exception e) {
            e.printStackTrace();
        }

    }
}
